import React, { Component } from 'react'
import {Switch,Route,Redirect} from 'react-router-dom'
import Admin from './containers/admin/Admin';
import Login from './containers/login/Login';
import './app.less';

export default class App extends Component {
    render() {
        return (
            <div className="app">
                <Switch>
                    <Route path='/admin' component={Admin}/>
                    <Route path='/login' component={Login}/>
                    {/*都没匹配上，就去admin(为什么去admin而不是login，因为可能有人已经登录过了 ----> 7天免登录) */}
                    <Redirect to="/admin"/>
                </Switch>
            </div>
        )
    }
}

